CI: Add metadata.toml validation workflow (implements #3272)#424
CI: Add metadata.toml validation workflow (implements #3272)#424Vanya-kapoor wants to merge 8 commits intomesa:mainfrom
Conversation
for more information, see https://pre-commit.ci
|
See my comment in #423 |
B2prakash
left a comment
There was a problem hiding this comment.
Nice work on the CI validation! A few thoughts:
-
The validation script looks solid — checking required fields, valid TOML syntax, and enum values for space/time/complexity covers the key cases.
-
Question about the space values — should "None" be a valid option? Some examples like pure network models might not have a spatial component, but I'm curious if maintainers want that as an explicit value or just make the field optional.
-
The workflow trigger — running only on PRs touching metadata files is smart, keeps CI fast. Does it also run on the scheduled checks, or is that planned separately?
-
One concern — the PR has multiple unrelated commits mixed in (forest_fire fixes, AgentSet.to_list fix, DataCollector import fix). These should probably be in separate PRs to keep review focused. The metadata validation is its own feature.
Summary
Adds automated CI validation for
metadata.tomlfiles in all examples,as discussed in #3272.
Changes
.github/workflows/validate_metadata.yml: GitHub Actions workflow thatruns on every PR touching metadata files
scripts/validate_metadata.py: Validation script that checks:spaceis one of: Grid, Network, Continuous, Nonetimeis one of: Discrete, Continuouscomplexityis one of: Basic, AdvancedWhy
As raised in #3272 without validation, metadata can silently drift
from the agreed standard as new examples are added. This ensures
every PR with a metadata.toml is automatically checked.
Related